<include file="Public:header" />
<div style="background:#fff; height:40px; line-height:40px; border-bottom:1px solid #ccc; text-align:center;" class="headernav1"> <a href="javascript:history.go(-1);" style="height:40px; width:40px; display:block; float:left; text-align:center;"><i class="fa fa-angle-left"></i></a> <i style="color:#ff1b51;" class="fa fa-cny"></i> 资金提现 <a href="{:U('Home/Cart/index')}" style="height:40px; width:40px; display:block; float:right; text-align:center;"><i class="fa fa-cart-plus"></i></a> </div>
<style>
.headernav1 .fa{font-size:20px;}
.headernav{display:none;}
.list-group {
	padding: 0;
}
.list-group li {
	border-color:#dff0d8;
}
.list-group li a {
	display: block;
}
.list-group li a .badge {
	float: right;
}
.list-group-item:first-child {
	
}

@media (min-width: 50px){
	     .nav-justified>li{
		display: table-cell;
		width: 1%;
	}

.panel-body {
    padding: 5px 5px;
}
.panel{margin-bottom:0px;}
.nav-justified>li>a{margin-bottom:0; border-radius:0;}	
	.nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover{background-color:#FF1B51;}

</style> 

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/validform/style.css">
<script src="__PUBLIC__/Js/validform/Validform.js"></script>


<div style="padding-bottom:0px; background:url(/Public/bg2_02.jpg); background-size:100% 100%;"> 
  <div class="panel-body" style=" padding:25px;border-radius:6px; text-align:left; color:#fff;">
    
    <p style="font-size:16px;"><strong>当前可提现金额
</strong></p>

<p style="font-size:30px;">{$detail_momey}元</p>

  </div>
</div>

<form class="checkoutform" id="checkout" action="<?php echo U('Member_account_log/detail');?>" method="post">
<div style="padding:10px; padding-bottom:0px; width:100%;">
      <ul class="nav nav-pills nav-justified" style="border:1px solid #FF1B51;background:#fff;">
          <li role="presentation" <if condition="$txstate eq 1">class="active"</if>><a href="{:U('detail',array('txstate'=>1))}">大额提现</a></li>
      </ul>
</div>
 


<!-- 微信红包提现 -->
<if condition="$txstate eq 0">

<div style="padding:10px;">
 <div class="" style=" background:#f2f2f2;">
    <div style="padding:15px;">

    <p><strong>    到账时间：1-2工作日到账</strong></p>




<p>微信红包提现每人、次最高限额200.00元，每天限10次，如需帮助请在服务号发送消息，在线客服为您解答。</p>

<p>提现会支付少许手续费，将从余额中扣除，当前手续费为{$poundage}%。</p>




    </div>
  </div>

  <div class="panel panel-success" style="margin-top:15px;">
  <div class="panel-heading">提现金额*</div>
  <div class="panel-body">
  <input type="text" name="demomey" datatype="n" id="demomey" class="form-control" placeholder="￥{$mindetail}.00-￥200.00" >
    <input type="hidden" value="0" name="txstate" id="txstate" >
    <input type="hidden" value="0" name="men_brinkid" id="men_brinkid" >
  </div>
  </div>



</div>

<div class="btn btn-success" style="display:block; margin:0 10px; font-size:18px; text-align:center;" onClick="checkouts()" >立即提现</div>



<!-- 微信大额提现 -->
<else />

 <div style="padding:10px;">
 <div>
    <div style="padding:15px;">
    
    <p><strong>到账时间：2-5个工作日到账</strong></p>
<p>银行转账每人、天最高限额为20000.00元，每天限1次，如需帮助请在服务号发送信息，在线客服为您解答。</p>
<p>提现会支付少许手续费，将从余额中扣除，当前手续费为{$poundage}%。</p>
    
    
    
    
    </div> 
  </div>
  
  <div class="panel panel-success" style="margin-top:15px;">
  <div class="panel-heading">提现金额*</div>
  <div class="panel-body">
  <input type="text" name="demomey" datatype="n" id="demomey"  class="form-control" placeholder="￥1000.00-￥20000.0" >
    <input type="hidden" value="1" name="txstate" id="txstate" >
  </div>
  
  </div>
  
  
  
  
</div>


<div class="panel panel-success" style="margin:10px;">
  <div class="panel-heading">
   <div style=" float:left;">
    <h3 class="panel-title">选择提现账户</h3>
    </div>
        <div style=" float:right;">
        <a href="{:U('address')}">
         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
        </a>
        </div>
        <div style="clear:both;"></div> 
  </div>
  <div class="panel-body" style="padding: 5px; ">
    <div class="list-group">
        <ul class="list-group">
            <volist name="bank" id="vo">
            <li class="list-group-item">
            <div class="radio">
              <label>
                <input type="radio" name="men_brinkid" id="men_brinkid"  value="{$vo.id}" />
                账户:{$vo.account} <br>
                账户名:{$vo.accountname}
              </label>
               <!-- 删除账户名 -->
                <div style=" position:absolute; right:5px; margin-top:-30px;">
                 <a href="{:U('deladr',array('id'=>$vo['id']))}" onClick="return confirm('请确认删除提款账号');">
                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                 </a>
                </div>
               <!-- -->
            </div>
            </li>
            </volist>            
        </ul>
    </div> 
  </div>
</div>

<div class="btn btn-success" style="display:block; margin:0 10px;font-size:18px; text-align:center;" onClick="checkouts()" >立即提现</div>

</if>



</form>

<script type="text/javascript">
$(".checkoutform").Validform();
document.getElementsByName("men_brinkid")[0].checked="checked";





function checkouts(){
	
	var demomey = document.getElementById("demomey").value;

	
	var men_brinkid = document.getElementById("men_brinkid").value;

	var txstate = document.getElementById("txstate").value;
    
	$.ajax({
			url:'{:U('detail')}',
			type:'post',
			dataType: 'json',
			data:{'demomey':demomey,'men_brinkid':men_brinkid,'txstate':txstate},
			success: function(data){

				  if(data.status == 1){

					  alert(data.info);exit;

				  }else{

					 document.getElementById('checkout').submit();exit;

				  }


			},
			error: function(){ alert('参数错误'); }
	});

}

$('input[name="demomey"]').change(function(){
	$('input[name="fee"]').val((($(this).val()*((12)/(100)))).toFixed(2));  
  });
</script>
<include file="Public:footer" />